<template>
	<scroll-view :scroll-y="scrY" @scroll="onScroll" :scroll-x="scrX" scroll-with-animation @scrolltolower="onlower">
		<slot></slot>
	</scroll-view>
</template>

<script>
	export default {
		name:"box-scroll",
		data() {
			return {
				scrollTop: 0,
			};
		},
		props:{
			scrY: {
				type: [Boolean, String],
				default: false
			},
			scrX: {
				type: [Boolean, String],
				default: false
			}
		},
		methods: {
			// 触底加载
			onlower() {
				this.$emit('lower')
			},
			onScroll(e) {
				this.scrollTop = e.detail.scrollTop;
			}
		}
	}
</script>

<style lang="scss">
.scroll-view {
	
}
</style>